{{$content := .Content }}
{{ if .Site.Params.enableBlockquoteEnhance }}
{{/*  blockquote enhance  */}}
{{ $content = replaceRE `<blockquote>\s<p>\[(\w+)]` `<blockquote class="$1"><p>` $content }}
{{ end }}

{{ if .Site.Params.enableCodeLangTag }}
{{ $content = replaceRE `<pre (.+?><code class="(\w+-(\w+))")` `<pre class="$2" data-lang="$3" $1` $content }}
{{end}}

{{ if .Site.Params.openLinkInNewTab }}
{{ $content = replaceRE `<a( href="[^#])` `<a target="_blank" rel="noopener"$1` $content }}
{{ end}}

{{ $content = replaceRE `<table` `<div class="table-responsive"><table class="table table-striped table-hover table-bordered" ` $content }}
{{ $content = replaceRE `</table>` `</table></div>` $content}}

{{- $content | safeHTML -}}